package com.jiangchao.mimidao.example.dao;

import com.jiangchao.mimidao.example.entity.Employee;
import com.jiangchao.mimidao.framework.annotation.Param;
import com.jiangchao.mimidao.framework.annotation.Sql;
import org.springframework.stereotype.Repository;

@Repository
public interface EmployeeDao {

  @Sql("select * from employee where id = :id")
  Employee get(@Param("id") String id);

  /**
   * 插入数据
   */
  void insert(@Param("employee") Employee employee);

  void update(@Param("employee") Employee employee);

  @Sql("delete from  employee where id = :id")
  void delete(@Param("id") String id);

}
